<?php
    namespace Home\Controller;
    use Think\Controller;
    class IndexController extends Controller {
        var $ROOT;
        public function index($tab = 0){
            $Usr = D('Home/Usr') ;
            $Usrg  = new \Home\Model\UsergroupModel();
            $this->assign('tab',$tab);
            $this->Page($tab);
            $this->display();
            if(!$this->is_login()){
                redirect(U('Login/index'),1,'请登录后使用,正在为你跳转！');
            }else{
                //获取权限
                $this->ROOT = $Usrg->Init(session('root'));   
            }
        }
}